home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / applic / ntp / depredated / ntp.3.4 / patches / patch8.Z / patch8
Encoding:
Text File  |  1991-09-29  |  9.1 KB  |  305 lines

  1. System: ntp version 3.4
  2. Patch #: 8
  3. Priority: 
  4.  
  5. From:
  6.  
  7. Description:
  8. Update suggested tickadj values in the README file.
  9.  
  10. The syslog message for peer selection had to be moved to account for the
  11.  
  12. anti-peer flapping code just installed.
  13.  
  14. Minor cosmetic changes and removed dead debug code from ntpd.c
  15.  
  16.  
  17. Repeat-By:
  18.  
  19. Fix:    Either ftp the new /pub/ntp.3.4/ntp-test.tar.Z file, or apply
  20.     this patch.
  21.  
  22.     From rn, say "| patch -p -N -d DIR", where DIR is your ntp source
  23.     directory.  Outside of rn, say "cd DIR; patch -p -N <thisarticle".
  24.     If you don't have the patch program, apply the following by hand,
  25.     or get patch (version 2.0, latest patchlevel).
  26.  
  27.     After patching:
  28.         make depend
  29.         make
  30.         make install
  31.  
  32.     If patch indicates that patchlevel is the wrong version, you may need
  33.     to apply one or more previous patches, or the patch may already
  34.     have been applied.  See the patchlevel.h file to find out what has or
  35.     has not been applied.  In any event, don't continue with the patch.
  36.  
  37.     If you are missing previous patches they can be obtained from me:
  38.  
  39.     Louis A. Mamakos
  40.     louie@trantor.umd.edu
  41.  
  42.  
  43.     You can also get the patches via anonymous FTP from
  44.     trantor.umd.edu.  
  45.  
  46. Index: patchlevel.h
  47. Prereq: 7
  48. 1c1
  49. < #define PATCHLEVEL 7
  50. ---
  51. > #define PATCHLEVEL 8
  52.  
  53. Index: README
  54. *** README.old    Sat Apr  8 10:38:13 1989
  55. --- README    Sat Apr  8 10:38:14 1989
  56. ***************
  57. *** 1,4 ****
  58. ! README for UNIX NTP release $Date: 89/03/29 13:04:47 $ $Revision: 3.4.1.3 $
  59.   
  60.   
  61.   
  62. --- 1,4 ----
  63. ! README for UNIX NTP release $Date: 89/04/08 10:35:44 $ $Revision: 3.4.1.4 $
  64.   
  65.   
  66.   
  67. ***************
  68. *** 30,41 ****
  69.       3) Change the Makefile definitions to suit your environment.
  70.       4) make
  71.       5) make install
  72. !     6) adb or remake kernel and change "tickadj" from 40 to 5
  73.           Recommended values for tickadj on various machines:
  74.   
  75.           VAX:    5
  76. !         Sun3:    ??
  77. !         Sun4:    10
  78.   
  79.           This step is optional; new algorithms will allow you to
  80.           get by (with reduced accuracy) with the system supplied
  81. --- 30,41 ----
  82.       3) Change the Makefile definitions to suit your environment.
  83.       4) make
  84.       5) make install
  85. !     6) adb or remake kernel and change "tickadj"
  86.           Recommended values for tickadj on various machines:
  87.   
  88.           VAX:    5
  89. !         Sun3:    10
  90. !         Sun4:    5
  91.   
  92.           This step is optional; new algorithms will allow you to
  93.           get by (with reduced accuracy) with the system supplied
  94. ***************
  95. *** 48,53 ****
  96. --- 48,63 ----
  97.       7) Fire up ntpd in /etc/rc.local
  98.   
  99.   History:
  100. + 4/8/89
  101. +     Changes to the ntp_proto.c module to supress peer switching when the
  102. +     dispersion between the newly selected peer and the currently selected
  103. +     peer is "small."  A new configuration option, NOSWAP, has been added
  104. +     for use on Ultrix systems which can lock the ntpd process in memory;
  105. +     very desirable for diskless workstations.  peer.reach is now not
  106. +     cleared in the clear() procedure.  The stat.pl perl script can now
  107. +     handle syslog records which span a month boundary correctly.  We're
  108. +     getting real close to a "blessed" version now.
  109.   3/29/89
  110.       A few fixes, clean up of unused #defines in ntp.h.  The receive()
  111.       procedure is now table driven per the 26 March 1989 draft of the
  112.  
  113. Index: ntp_proto.c
  114. *** ntp_proto.c.old    Sat Apr  8 10:38:22 1989
  115. --- ntp_proto.c    Sat Apr  8 10:38:25 1989
  116. ***************
  117. *** 1,5 ****
  118.   #ifndef    lint
  119. ! static char *rcsid = "$Source: /usr/users/louie/ntp/RCS/ntp_proto.c,v $ $Revision: 3.4.1.6 $ $Date: 89/04/07 19:07:10 $";
  120.   #endif
  121.   
  122.   /*
  123. --- 1,5 ----
  124.   #ifndef    lint
  125. ! static char *rcsid = "$Source: /usr/users/louie/ntp/RCS/ntp_proto.c,v $ $Revision: 3.4.1.7 $ $Date: 89/04/08 10:36:53 $";
  126.   #endif
  127.   
  128.   /*
  129. ***************
  130. *** 11,16 ****
  131. --- 11,20 ----
  132.   
  133.   /*
  134.    * $Log:    ntp_proto.c,v $
  135. +  * Revision 3.4.1.7  89/04/08  10:36:53  louie
  136. +  * The syslog message for peer selection had to be moved to account for the
  137. +  * anti-peer flapping code just installed.
  138. +  * 
  139.    * Revision 3.4.1.6  89/04/07  19:07:10  louie
  140.    * Don't clear peer.reach register in the clear() procedure.  Code to prevent
  141.    * flapping between two peers with very similar dispersions.
  142. ***************
  143. *** 985,1005 ****
  144.       if (debug > 3)
  145.           printf("select_clock: step6 %d candidates\n", candidates);
  146.   #endif
  147. -     /* 
  148. -      * ok.  We've finally select our best bet for a clock to synchronize to.
  149. -      */
  150. -     if (sys.peer != sel_lst[0].peer) {
  151. -         if (sys.peer != NULL)
  152. -             syslog(LOG_INFO, "clock: select peer %s stratum %d was %s stratum %d",
  153. -                    ntoa(sel_lst[0].peer->src.sin_addr),
  154. -                    sel_lst[0].peer->stratum,
  155. -                    ntoa(sys.peer->src.sin_addr), sys.peer->stratum);
  156. -         else
  157. -             syslog(LOG_INFO, "clock: select peer %s stratum %d was UNSYNCED",
  158. -                    ntoa(sel_lst[0].peer->src.sin_addr),
  159. -                    sel_lst[0].peer->stratum);
  160. -     }
  161.       if (sys.peer != NULL && sys.peer != sel_lst[0].peer) {
  162.           /* 
  163.            * Potential peer is different that current one; don't switch
  164. --- 989,994 ----
  165. ***************
  166. *** 1032,1037 ****
  167. --- 1021,1042 ----
  168.                  ntoa(sel_lst[0].peer->src.sin_addr),
  169.                  sel_lst[0].peer->stratum);
  170.   #endif
  171. +     /* 
  172. +      *  We've finally selected our best bet for a clock to synchronize to.
  173. +      */
  174. +     if (sys.peer != sel_lst[0].peer) {
  175. +         if (sys.peer != NULL)
  176. +             syslog(LOG_INFO, "clock: select peer %s stratum %d was %s stratum %d",
  177. +                    ntoa(sel_lst[0].peer->src.sin_addr),
  178. +                    sel_lst[0].peer->stratum,
  179. +                    ntoa(sys.peer->src.sin_addr), sys.peer->stratum);
  180. +         else
  181. +             syslog(LOG_INFO, "clock: select peer %s stratum %d was UNSYNCED",
  182. +                    ntoa(sel_lst[0].peer->src.sin_addr),
  183. +                    sel_lst[0].peer->stratum);
  184. +     }
  185.   
  186.       /* finally, set new peer */
  187.       sys.peer = sel_lst[0].peer;
  188.  
  189. Index: ntpdc.c
  190. *** ntpdc.c.old    Sat Apr  8 10:38:32 1989
  191. --- ntpdc.c    Sat Apr  8 10:38:33 1989
  192. ***************
  193. *** 1,9 ****
  194.   #ifndef    lint
  195. ! static char *RCSid = "$Source: /usr/users/louie/ntp/RCS/ntpdc.c,v $ $Revision: 3.4.1.4 $ $Date: 89/03/29 12:41:56 $";
  196.   #endif
  197.   
  198.   /*
  199.    * $Log:    ntpdc.c,v $
  200.    * Revision 3.4.1.4  89/03/29  12:41:56  louie
  201.    * Check for success sending query before trying to listen for answers.  Will 
  202.    * catch case of no server running and an ICMP port unreachable being returned.
  203. --- 1,12 ----
  204.   #ifndef    lint
  205. ! static char *RCSid = "$Source: /usr/users/louie/ntp/RCS/ntpdc.c,v $ $Revision: 3.4.1.5 $ $Date: 89/04/08 10:38:06 $";
  206.   #endif
  207.   
  208.   /*
  209.    * $Log:    ntpdc.c,v $
  210. +  * Revision 3.4.1.5  89/04/08  10:38:06  louie
  211. +  * Minor cosmetic changes and removed dead debug code from ntpd.c
  212. +  * 
  213.    * Revision 3.4.1.4  89/03/29  12:41:56  louie
  214.    * Check for success sending query before trying to listen for answers.  Will 
  215.    * catch case of no server running and an ICMP port unreachable being returned.
  216. ***************
  217. *** 210,216 ****
  218.   
  219.           if (first) {
  220.               first = 0;
  221. !             replies = (1L <<msg->npkts) - 1;
  222.               if (!vflag) {
  223.                   printf("   (rem)  Address   (lcl)      Strat Poll Reach    Delay   Offset    Disp\n");
  224.                   printf("==========================================================================\n");
  225. --- 213,219 ----
  226.   
  227.           if (first) {
  228.               first = 0;
  229. !             replies = (1L << msg->npkts) - 1;
  230.               if (!vflag) {
  231.                   printf("   (rem)  Address   (lcl)      Strat Poll Reach    Delay   Offset    Disp\n");
  232.                   printf("==========================================================================\n");
  233. ***************
  234. *** 217,227 ****
  235.               }
  236.           }
  237.           replies &= ~(1L << msg->seq);
  238. - #if    0
  239. -         printf("Got response: ver %d, %d entries of %d (%d of %d responses) %lx\n",
  240. -                msg->version, msg->count, msg->peers,
  241. -                msg->seq+1, msg->npkts, replies);
  242. - #endif
  243.           n = (struct clockinfo *)&msg[1];
  244.           for (count = msg->count; count > 0; count--) {
  245.               if(vflag)
  246. --- 220,225 ----
  247. ***************
  248. *** 295,301 ****
  249.           delay[i] = (double) ((long) (ntohl(n->info_filter.delay[i])/1000.0));
  250.           offset[i] = (double) ((long) (ntohl(n->info_filter.offset[i])/1000.0));
  251.       }
  252. !     dsp = ((long) ntohl(n->estdisp));    /* leave in milliseconds */
  253.       del = (long) ntohl(n->estdelay);    /* leave in milliseconds */
  254.       off = (long) ntohl(n->estoffset);    /* leave in milliseconds */
  255.       c = ' ';
  256. --- 293,299 ----
  257.           delay[i] = (double) ((long) (ntohl(n->info_filter.delay[i])/1000.0));
  258.           offset[i] = (double) ((long) (ntohl(n->info_filter.offset[i])/1000.0));
  259.       }
  260. !     dsp = (long) ntohl(n->estdisp);        /* leave in milliseconds */
  261.       del = (long) ntohl(n->estdelay);    /* leave in milliseconds */
  262.       off = (long) ntohl(n->estoffset);    /* leave in milliseconds */
  263.       c = ' ';
  264. ***************
  265. *** 377,385 ****
  266.       register char *p;
  267.       extern char *inet_ntoa();
  268.   
  269. - #ifdef    debug
  270. -     printf("cvthname(%s)\n", inet_ntoa(f->sin_addr));
  271. - #endif
  272.       if (f->sin_family != AF_INET) {
  273.           printf("Malformed from address\n");
  274.           return ("???");
  275. --- 375,380 ----
  276. ***************
  277. *** 390,402 ****
  278.       else
  279.           return (inet_ntoa(f->sin_addr));
  280.   
  281. !     if (hp == 0) {
  282. ! #ifdef    debug
  283. !         printf("Host name for your address (%s) unknown\n",
  284. !             inet_ntoa(f->sin_addr));
  285. ! #endif
  286.           return (inet_ntoa(f->sin_addr));
  287. !     }
  288.       if ((p = index(hp->h_name, '.')) && strcmp(p + 1, LocalDomain) == 0)
  289.           *p = '\0';
  290.       return (hp->h_name);
  291. --- 385,393 ----
  292.       else
  293.           return (inet_ntoa(f->sin_addr));
  294.   
  295. !     if (hp == 0)
  296.           return (inet_ntoa(f->sin_addr));
  297.       if ((p = index(hp->h_name, '.')) && strcmp(p + 1, LocalDomain) == 0)
  298.           *p = '\0';
  299.       return (hp->h_name);
  300.